//存放用户相关的接口
import axios from '../utils/utils'


//设置基本服务器路径
// axios.defaults.baseURL = 'http://127.0.0.1:5000'

//登陆接口
export let login = params => axios.post('/users/checkLogin', params)

//添加账号
export let adduser = params => axios.post('/users/add', params)

//获取账号列表
export let addlist = params => axios.get('/users/list', { params })

//删除账号
export let removeuser = params => axios.get('/users/del', { params })

//批量删除
export let removeall = params => axios.get('/users/batchdel', { params })

//保存修改账号信息
export let saveuser = params => axios.post('/users/edit', params)

//检查旧密码是否可用
export let oldpwd = params => axios.get('/users/checkoldpwd', { params })

//修改密码
export let newpwd = params => axios.post('/users/editpwd', params)

//用户详细信息
export let account = params => axios.get('/users/accountinfo', { params })

// 验证token是否过期
export let checktoken = params => axios.get('/users/checktoken', { params })



